package com.xunyin.modules.membersuser.service;

import com.xunyin.common.service.BaseService;
import com.xunyin.modules.membersuser.domain.TMembersUser;
import com.xunyin.modules.membersuser.param.TMembersUserQueryParam;
import com.xunyin.modules.membersuser.service.dto.TMembersUserDto;
import com.xunyin.modules.membersuser.service.dto.TMembersUserQueryCriteria;
import com.xunyin.modules.membersuser.vo.MemberUserTimeLongVo;
import com.xunyin.modules.membersuser.vo.MemberUserVo;
import com.xunyin.modules.membersuser.vo.MembersDiscountVo;
import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.Map;

/**
 * @author admin
 * @date 2022-09-22
 */
public interface TMembersUserService extends BaseService<TMembersUser> {

    /**
     * 查询数据分页
     *
     * @param criteria 条件
     * @param pageable 分页参数
     * @return Map<String, Object>
     */
    Map<String, Object> queryAll(TMembersUserQueryCriteria criteria, Pageable pageable);

    /**
     * 查询所有数据不分页
     *
     * @param criteria 条件参数
     * @return List<TStore>
     */
    List<TMembersUser> queryAll(TMembersUserQueryCriteria criteria);

    Boolean getNewUserCoupons(String openId);

    List<TMembersUserDto> getMembersTimelong(Integer mainId, String memberUserPhone);

    List<MemberUserVo> getUserMemberInfo(String memberUserPhone, String appId);

    Boolean getTransferTimeAndMember(String appId, Integer mainId, Double transferTime, String transPhone, String userPhone);

    List<MemberUserTimeLongVo> getTimelongRecord(TMembersUserQueryParam param);

    MembersDiscountVo getMembersDiscount(Integer mainId, String memberUserPhone);
}
